<?php

namespace App\Observers;

use App\Models\Goods;

class GoodsObserver
{
    /**
     * Handle the goods "created" event.
     *
     * @param  \App\Models\Goods  $goods
     * @return void
     */
    public function created(Goods $goods)
    {
        \Cache::forget('categoryGoods');
    }

    /**
     * Handle the goods "updated" event.
     *
     * @param  \App\Models\Goods  $goods
     * @return void
     */
    public function updated(Goods $goods)
    {
        \Cache::forget('categoryGoods');
    }

    /**
     * Handle the goods "deleted" event.
     *
     * @param  \App\Models\Goods  $goods
     * @return void
     */
    public function deleted(Goods $goods)
    {
        \Cache::forget('categoryGoods');
    }

    /**
     * Handle the goods "restored" event.
     *
     * @param  \App\Models\Goods  $goods
     * @return void
     */
    public function restored(Goods $goods)
    {
        //
    }

    /**
     * Handle the goods "force deleted" event.
     *
     * @param  \App\Models\Goods  $goods
     * @return void
     */
    public function forceDeleted(Goods $goods)
    {
        //
    }
}
